<?php

class Admin_Model_Auth
{
	public function _getAuthAdapter( array $formData )
	{
		$authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter());
        $authAdapter->setTableName( 'users' )
                    	->setIdentityColumn( 'username' )
                    	->setCredentialColumn( 'password' );
        
        $authAdapter->setIdentity($formData['username']);
        $authAdapter->setCredential(md5($formData['password']));

        return $authAdapter;
	}	

}

